import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import Home from './views/Home.vue'
import Main from './views/Main.vue'
import echarts from './views/charts/echarts.vue'
//=====================导入自定义组件|===============================
import Department from "./views/org/department/Department";
import Employee from "./views/org/employee/Employee.vue";
import Permission from "./views/auth/permission/Permission.vue";
import Role from "./views/auth/role/Role.vue";
import Menu from "./views/auth/menu/Menu.vue";
import NoPermission from "./views/nopermission/NoPermission.vue";
import User from "./views/org/user/User.vue";
//=====================导入自定义组件===============================

let routes = [
    {
        path: '/',
        component: Home,
        name: 'Charts',
        iconCls: 'fa fa-bar-chart',
        leaf: true,//只有一个节点
        children: [
            { path: '/echarts', component: echarts, name: '首页' },
            {path: '/noPermission', component: NoPermission, name: '无法访问页', hidden: true},
        ]
    },
    {
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },
    {
        path: '/',
        component: Home,
        name: '部门数据管理',
        iconCls: 'fa fa-id-card-o',
        children: [
            { path: '/department', component: Department, name: '部门管理' },
            { path: '/employee', component: Employee, name: '员工管理' },
            {path: '/user',component: User,name:'用户管理'}
        ]
    },
    {
        path: '/',
        component: Home,
        name: '权限数据管理',
        iconCls: 'fa fa-id-card-o',
        children: [
            { path: '/permission', component: Permission, name: '权限管理' },
            { path: '/role', component: Role, name: '角色管理' },
            {path: '/menu',component: Menu,name:'菜单管理'}
        ]
    },
    {
        path: '*',
        hidden: true,
        redirect: { path: '/404' }
    }
];

export default routes;